{% extends "common/layout_main.html" %}
  {%block css %}<meta http-equiv="refresh" content="60">{% endblock %}
{% block content %}
		<div class="form-group">
            		<div class="form-horizontal m-t m-b">
                    <div class="row">
                <div class="col-lg-12">
                    <a class="btn btn-w-m btn-outline btn-primary pull-right"
                       href="{{ buildUrl('/mon/set') }}">
                        <i class="fa fa-plus"></i>监控IP
                    </a>
                </div>
            </div><hr>
<div class="row">
    <div class="col-lg-12">
          <form class="form-inline warp_cron"  >
            <div class="row  m-t p-w-m">
                <div class="form-group">

                       选择扫描间隔：
                        <select name="times"   id="crontime" style="height:30px;outline:0;">
                   <option value="1">1分钟</option>
                   <option value="2">2分钟</option>
                   <option value="3">3分钟</option>
                   <option value="5">5分钟</option>
                   <option value="10">10分钟</option>
                   <option value="30">30分钟</option>

               </select>
                      <div class="input-group">
                        <span class="input-group-btn">
                            <button type="button" class="btn  btn-primary start" >
                                <i class="fa fa-play"></i>开启
                            </button>
                            <button type="button" class="btn  btn-primary stop">
                                <i class="fa fa-stop"></i>关闭
                            </button>
                        </span>
                    </div>
                </div>
            </div>
            <hr>
        </form>
        <table class="table table-bordered m-t">
            <thead>
            <tr>
                <th>IP</th>
                <th>当前状态</th>
                <th>最后扫描时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            {% if info %}
            {%  for item in info  %}
            <tr>
                <td>{{ item.ipaddr}}</td>
                <td> <img src={% if item.isok ==1 %}{{ buildStaticUrl("/images/green.png")}}{% else %}{{ buildStaticUrl("/images/red.png")}}{% endif %} height="30" width="30" ></td>
                <td>{{ item.update_time }}</td>
                <td>
                    <a href="{{ buildUrl('/mon/info') }}?id={{ item.id  }}">
                        <i class="fa fa-eye fa-lg"></i>
                    </a>
                    <a class="m-l remove" href="javascript:void(0);" data="{{ item.id  }}">
                        <i class="fa fa-trash fa-lg"></i>
                    </a>
                </td>
            </tr>
            {% endfor %}
            {% else %}
            <tr>
                <td colspan="3">暂无数据</td>
            </tr>
            {% endif %}
            </tbody>
        </table>
        <!--分页代码已被封装到统一模板文件中-->
    </div>
</div>
{% endblock %}
{% block js %}
  <script src="{{ buildStaticUrl('/js/mon/index.js') }}"></script>
{% endblock %}
